﻿using aier.dataaccess.dapper;
using aier.dataaccess.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.business.logic
{
    public class CategoryBll
    {
        public CategoryDal categoryDal{ get; set; }

        /// <summary>
        /// 获取所有项目
        /// 原程序 ScCategoryServiceImpl/getAll
        /// </summary>
        /// <returns></returns>
        public List<CategoryView> GetAllCategoryInfo()
        {
            List<CategoryView> categoryViews = null;
            categoryViews = categoryDal.GetAllCategoryInfo();
            return categoryViews;
        }
        /// <summary>
        /// 根据项目ID获取项目
        /// 查询条件：项目ID
        /// 原程序 ScCategoryServiceImpl/getById
        /// </summary>
        /// <returns></returns>
        public CategoryView GetCategoryInfoById(string CategoryId)
        {
            CategoryView categoryView = categoryDal.GetCategoryInfoById(CategoryId);
            return categoryView;
        }

        /// <summary>
        /// 根据模版id获取筛查类别
        /// </summary>
        /// <param name="templateId"></param>
        /// <returns></returns>
        public IEnumerable<CategoryView> GetCategorIdByTmeplateId(Guid templateId)
        {
            return categoryDal.GetCategorIdByTmeplateId(templateId);
        }

    }
}
